<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script type="text/javascript" src="./js/angular.min.js"></script>
<style type="text/css">
.red{color:red;}
</style>
</head>
<body>
<div ng-app="myApp" ng-controller="myAppController">
	<input type="text" ng-model="userName">
	{{userName}}
</div>
<script type="text/javascript">
var myApp = angular.module("myApp",[]);
myApp.controller("myAppController",function($scope){
	$scope.userName = null;
	$scope.$watch("userName",function(newVal,oldVal){
		console.log(newVal);
	});
});
</script>
</body>
</html>